<div style="display: flex;flex-wrap: wrap">
    @for(item in ratingItemsInfoList){
    <div style="width: 20%;margin-bottom: 10px;display: flex">
        <span style="width: 130px;">${item.ratingItems}：</span>
        <input class="ratingItemsScore" type="text" oninput="value=value.replace(/[^\d]/g,''),minimumValue(this)" value="${item.score}" style="padding-left: 5px;width: 40%">
        <input class="ratingItemsScore1" type="hidden" style="display: none">
        <div style="display: none">
            <input class="ratingItems"  type="text" value="${item.ratingItems}">
        </div>
    </div>
    @}
</div>
<div style="margin-bottom: 7px;">
    <span style="vertical-align: top;">评语：</span>
    <textarea name="caseComment" id="caseComment" style="width: 60%;padding-left: 5px;">${caseSelectionUploadInfo.caseComment}</textarea>
</div>
<div style="margin-bottom: 10px;">
    <span>模板：</span>
    <div class="btn-group" style="position: relative">
        <a href="javascript:;" onclick="addMark()" style="position: absolute;left: 120px;top: 50%;transform: translateY(-50%);width: 100px;">添加标签模板</a>
        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="border-radius: 5px;background: white;color: inherit;">标签模板</button>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenu2" style="left: 0;" id="dropdownMenu2Ul"></ul>
    </div>
</div>
<div style="margin-bottom: 10px;">
    <span style="vertical-align: top;">标签：</span>
    <textarea name="mark" id="mark" style="width: 60%;padding-left: 5px;">${caseSelectionUploadInfo.mark}</textarea>
</div>
<div>
    <button type="button" class="btn" onclick="CaseAddInfoDlg.selectionstorage()">暂存</button>
    <button type="button" class="btn" onclick="CaseAddInfoDlg.selectionsubmitTo()">提交</button>
    <button type="button" class="btn" onclick="CaseAddInfoDlg.close()">取消</button>
</div>
<script>
    $.ajax({
        url: Feng.ctxPath + "/caseSelection/getMarkList",
        type: "post",
        success: function (data) {
            var li = "";
            for (var i = 0; i < data.length; i++) {
                li += '<li id="' + data[i].customMark + '" style="position: relative"><a href="javascript:;">' + data[i].customMark + '</a><span class="glyphicon glyphicon-remove" style="position: absolute;top: 50%;right: 10px;transform: translateY(-50%)"></span></li>'
            }
            $("#dropdownMenu2Ul").html(li)
        },
        error: function (data) {
            alert('没有权限，请联系管理员!');
        }
    });
    $("#dropdownMenu2").on('click', 'li', function () {
        var value = $(this).attr('id');
        $("#mark").val($("#mark").val()+" "+value);
    });
    function addMark() {
        var index = layer.open({
            type: 2,
            title: '&nbsp',
            area: ['40%', '40%'],
            fix: true,
            maxmin: true,
            content: Feng.ctxPath + '/caseSelection/to_mark_label/'
        });
        this.layerIndex = index;
    }
    function minimumValue(obj) {
        if(parseInt($(obj).val()) > 100){
            $(obj).val($(obj).siblings('.ratingItemsScore1').val());
        }else {
            $(obj).siblings('.ratingItemsScore1').val($(obj).val());
        }
    }
    $("#dropdownMenu2Ul").on('click','.glyphicon-remove',function (e) {
        e.stopPropagation();
        var mark = $(this).parent().attr('id');
        if (confirm("是否删除此模板？")) {
            $.ajax({
                url: Feng.ctxPath + "/caseSelection/deleteMarkLabel",
                type: "post",
                data:{
                    mark:mark
                },
                success: function (data) {
                    Feng.success("删除成功!");
                    window.location.reload();
                },
                error: function (data) {
                }
            });
        }
    });
</script>